{extend name="common/base" /}
<!--title-->
{block name="titlekeyword"}
<title>{$content}</title>

{/block}
<!--代码主要内容-->
{block name="main"}
<h6>内容</h6>
<select id=myCourse onchange="getCourse();">
	<option value="" selected>--请选择一门功课--</option>
</select>
<textarea id=myares cols=30 rows=10>
		</textarea>
<h6>代码</h6>
<pre>


	 </pre> {/block}
<!--底部js 在这里是js的实际代码区-->
{block name="footjs"}
<script language="javascript">
	var last_select_num = 3;//从数据库查询，已选三门课
	//动态添加第一门 java
	var myOption = document.createElement("OPTION");
	myOption.value = "java";
	myOption.text = "java";
	myCourse.add(myOption);

	//添加第二门课oracle
	myOption = document.createElement("OPTION");
	myOption.value = "oracle";
	myOption.text = "oracle";
	myCourse.add(myOption);

	myOption = document.createElement("OPTION");
	myOption.value = "j2ee";
	myOption.text = "j2ee";
	myCourse.add(myOption);
	function getCourse() {
		//注意两种方式的结果，有区别
		myares.value += "你选中" + myCourse.value + "\r\n";
		//myares.value="选择："+myCourse.options[myCourse.selectedIndex].innerText;
	}
</script> {/block}